Skip to content

Validate remaining FP16 instruction features - #8979

Merged
tlively merged 1 commit into
WebAssembly:mainfrom
ANAMASGARD:fix/fp16-simd-ternary-validation
Aug 26, 2026
Merged

tlively merged 1 commit into
WebAssembly:mainfrom
ANAMASGARD:fix/fp16-simd-ternary-validation

Conversation

@ANAMASGARD

Copy link
Copy Markdown
Contributor

Fixes #8313

Summary

  • Move seven unguarded FP16 unary conversion case labels into the existing FP16-guarded fallthrough group in visitUnary
  • Require FP16 for f32.load_f16 and f32.store_f16 in visitLoad/visitStore
  • Add lit regression tests: 7 independent unary modules + 2 independent memory modules via foreach
    The SIMDTernary madd/nmadd case from the original report was fixed by Validate SIMDTernary features #8403; this PR closes the remaining identifiable FP16 validation gaps found by audit.

Test plan

  • build-clang/bin/binaryen-lit test/lit/validation/fp16-unary.wast -v
  • build-clang/bin/binaryen-lit test/lit/validation/fp16-memory.wast -v
  • build-clang/bin/binaryen-lit test/lit/validation -v
  • ./check.py --binaryen-bin build-clang/bin validator

The originally reported SIMDTernary case was fixed by WebAssembly#8403. This adds
missing FP16 feature validation for seven unary conversion ops and
f32.load_f16/f32.store_f16 when --enable-fp16 is not set. Fixes WebAssembly#8313.

Signed-off-by: Gaurav Chaudhary <chaudharygaurav2004@gmail.com>
@ANAMASGARD
ANAMASGARD requested a review from a team as a code owner August 7, 2026 11:28
@ANAMASGARD
ANAMASGARD requested review from stevenfontanella and removed request for a team August 7, 2026 11:28

@tlively tlively left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@tlively
tlively merged commit 7bed2be into WebAssembly:main Aug 26, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing fp16 type validation

2 participants